﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using carShopControl.DAL;

namespace carShopControl.BLL
{
    public class SanPhamBLL
    {
        public int ID { get; set; }
        public string MaSanPham { get; set; }
        public string TenSanPham { get; set; }
        public string MoTa { get; set; }
        public decimal Gia { get; set; }
        public string BaoHanh { get; set; }
        public string Anh { get; set; }
        public int SoTon { get; set; }
        private LoaiSanPhamBLL loaiSanPham;
        public LoaiSanPhamBLL LoaiSanPham
        {
            set { loaiSanPham = value; }
            get 
            {
                if (loaiSanPham==null)
                {
                    loaiSanPham = new LoaiSanPhamBLL();
                }
                return loaiSanPham;
            }
        }
        public string TenLoaiSanPham
        {
            get { return "a"; }
        }

        public static List<SanPhamBLL> GetAll()
        {
            return SanPhamDAL.GetAll();
        }
    }
}
